﻿namespace ChatBackend.Hubs
{
    public class ClientUserDto
    {
        /// <summary>
        /// 客户端连接Id
        /// </summary>
        public string? ConnectionId { get; set; }

        /// <summary>
        /// 用户id
        /// </summary>
        public long? UserId { get; set; }

        public string? Name { get; set; }
        public DateTime? LoginTime { get; set; }

        public ClientUserDto(string clientid, string name, long? UserId)
        {
            ConnectionId = clientid;
            Name = name;
            LoginTime = DateTime.Now;
            this.UserId = UserId;
        }

        public ClientUserDto()
        {
        }

        public ClientUserDto(string clientid)
        {
            ConnectionId = clientid;
        }
    }
}